#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include "user.h"
#include "room.h"
#include "costumer.h"
#include "bill.h"

int cleanerMenu()
{
	int c;
	printf("\t\t\t    Hetol Management       \n");
	printf("\t\t\t*************************************\n");
	printf("\t\t\t    Administrator System\n");
	printf("\t\t\t    1 : find no clean rooms\n");
	printf("\t\t\t    2 : clean ok\n");
	printf("\t\t\t    3 : change self\n");
	printf("\t\t\t    0 : quit\n");
	printf("\t\t\t*************************************\n");
	printf("select:");
	scanf("%d",&c);
	getchar();
	while(c<0 || c>3)
	{
		printf("you input is wrong,please enter again!\n");
		scanf("%d",&c);
		getchar();
	}
	return c;
}

void cleanersystem(User *r)
{
	int c,loop = 1;
//	User *pr;
	Room *pt;
	while(loop)
	{
		system("clear");
		//showTime(1);
		printf("%s\n",r->userId);
		c = cleanerMenu();
		switch(c){
			case 1:pt = read_room();
			noclean_room(pt);
			break;
			case 2:pt = read_room();
			clean_ok(pt);
			break;
//			case 3:change_self();
//			break;
			default:
			loop = 0;
		}//switch
	}//while
}